﻿Public Class Form1
    Private WithEvents FList As New Package
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If OpenFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
            FList.Add(OpenFileDialog1.FileName)
        End If
    End Sub
    Private Sub FList_Update() Handles FList.Update
        ListView1.Items.Clear()
        For Each F As FileItem In FList.Items
            Dim File As String = F.Filename
            Dim LVI As New ListViewItem(File)
            Dim Path As String = F.Path
            LVI.SubItems.Add(Path)
            ListView1.Items.Add(LVI)
        Next
        Label2.Text = FList.Destination
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        FList.Remove(ListView1.SelectedItems(0).Text)
    End Sub

    Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
        FList.Save("c:\list.ser")

    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
        FList.Load("c:\list.ser")
    End Sub

    Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
        If FolderBrowserDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
            Label2.Text = FolderBrowserDialog1.SelectedPath
            FList.Destination = FolderBrowserDialog1.SelectedPath
        End If
    End Sub

    Private Sub TableLayoutPanel1_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles TableLayoutPanel1.MouseEnter

    End Sub

    Private Sub TableLayoutPanel1_Paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles TableLayoutPanel1.Paint

    End Sub
End Class
